home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tricks of the Mac Game Programming Gurus
/
TricksOfTheMacGameProgrammingGurus.iso
/
Book Chapters
/
10 - Networking
/
NovelNetwar
/
cursors.c
< prev
next >
Wrap
Text File
|
1995-05-12
|
797b
|
76 lines
// This module takes care of setting the cursor appearance.
#include "NovelNetwar.h"
#define kSysEnvironsVersion 1
static Cursor waitCursor;
static Cursor lastCursor;
static SysEnvRec gMac;
void cursorsInit(void)
{
lastCursor = qd.arrow;
}
void cursorsStartup(void)
{
CursHandle hCurs;
CCrsrHandle hCrsr;
hCurs = 0L;
hCurs = GetCursor(watchCursor);
if (hCurs)
{
waitCursor = **hCurs;
}
SysEnvirons(kSysEnvironsVersion, &gMac);
}
void cursorsMaintainCursor(Point theMousePt)
{
if (IAmFrontApp)
{
SetCursor(&(qd.arrow));
}
}
void cursorsShutDown(void)
{
}
void cursorReactToMouseClick(Point theMousePt)
{
int theOwner;
if (IAmFrontApp && IsOurWindow(FrontWindow()) == noErr)
{
SetCursor(&(qd.arrow));
lastCursor = qd.arrow;
}
}